import UIKit

let arr = Array<Int>([2, 3, 5, 7])
// 遍历元素
for item in arr {
  print(item, terminator: " ")
}

print()

// 遍历索引
for i in arr.indices {
  print("index: \(i), item: \(arr[i])")
}

print()
// 带索引的遍历
for (index, item) in arr.enumerated() {
  print(item, terminator: " ")
}
